package jmine.tec.aom.domain.impl;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

import jmine.tec.aom.domain.AbstractPropertyValue;
import jmine.tec.persist.annotation.Constraint;
import jmine.tec.persist.annotation.DiscriminatorComment;
import bancosys.tec.component.Documentation;

/**
 * {@link AbstractPropertyValue} implementation for the {@link Boolean} type.
 * 
 * @author jrenaut
 */
@Entity
@DiscriminatorValue("1")
@DiscriminatorComment("BOOLEAN")
public class BooleanPropertyValue extends AbstractPropertyValue<Boolean> {

    /**
     * {@inheritDoc}
     */
    @Override
    @Constraint(suffix = "IB_1")
    @Column(name = "VL_BOOLEAN")
    @Documentation("VALOR DA CARACTERISTICA DO TIPO BOOLEAN")
    public Boolean getValue() {
        return super.getValue();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void doSetValue(String value) {
        this.setValue(Boolean.parseBoolean(value));
    }

}
